<!DOCTYPE html>
<html>

<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <script src="./jquery-1.11.1.js"></script>
    <style type="text/css">
        .ad {
            display: none;
            position: fixed;
            right: 0;
            bottom: 0;
            width: 230px;
            height: 120px;
            background-image: url(./images/ad.jpg);
        }

        .ad span {
            position: absolute;
            right: 0;
            top: 0;
            width: 40px;
            height: 18px;
            background-image: url(./images/h.jpg);
            cursor: pointer;
        }
    </style>
    
</head>
<body>

    <!--整个广告-->
    <div class="ad">
        <!--关闭按钮-->
        <span></span>
    </div>
    <script>
        $(function(){
            $('.ad').slideUp(2000).fadeIn(2000)
            $('span').click(function(){
                $('.ad').fadeOut(2000)
            })
        })
    </script>
</body>
</html>
